<div id="top-panel">
    <div id="panel">
        <ul>
            <li><a href="<?php echo site_url("ads/assign_list/".$ads_id); ?>" class="report_seo">Assign List</a></li>			
        </ul>
    </div>
</div>
<script language="javascript">
	var jq = jQuery.noConflict();
	jq(document).ready(function(){
		jq(function(){
			jq( "#start_date" ).datepicker({
				altField: "#alternate",
				altFormat: "DD, d MM, yy"
			});
			jq( "#end_date" ).datepicker({
				altField: "#alternate",
				altFormat: "DD, d MM, yy"
			});
		});
	});
</script>
<div id="wrapper">
	<div id="content">
		<div id="rightnow">
			<h3 class="reallynow">Edit Item</h3>
			<div>
				<?php echo validation_errors(); ?>
			</div>
			<?php echo form_open('ads/save_assign') ?>
			<input type="hidden" name="id" value="<?php echo $ads_assign['id']; ?>" />
			<input type="hidden" name="ads_id" value="<?php echo $ads_id; ?>" />
			<input type="hidden" name="kiosk_id[]" value="<?php echo $ads_assign['kiosk_id']; ?>" />
			<table width="100%">
				<tr>
					<td>Ad text</td>
					<td>
						<?php echo $ads_assign['ad_text']; ?>
					</td>
				</tr>	
				<tr>
					<td>KIOSK</td>
					<td><?php echo $ads_assign['mac_address']; ?></td>
				</tr>
				<tr>
					<td>Start Date</td>
					<td><input type="text" name="start_date" id="start_date" class="input" value="<?php echo $start_date; ?>" />
						<select name="start_h">
							<?php foreach($h as $v): ?>
								<option value="<?php echo $v;?>" <?php if(isset($start_h) && $start_h==$v):?> selected="selected"<?php endif; ?>><?php echo $v;?></option>
							<?php endforeach; ?>
						</select>:
						<select name="start_i">
							<?php foreach($i as $v): ?>
								<option value="<?php echo $v;?>"<?php if(isset($start_i) && $start_i==$v):?> selected="selected"<?php endif; ?>><?php echo $v;?></option>
							<?php endforeach; ?>
						</select>:
						<select name="start_s">
							<?php foreach($s as $v): ?>
								<option value="<?php echo $v;?>"<?php if(isset($start_s) && $start_s==$v):?> selected="selected"<?php endif; ?>><?php echo $v;?></option>
							<?php endforeach; ?>
						</select>:
					</td>
				</tr>
				<tr>
					<td>End Date</td>
					<td><input type="text" name="end_date" id="end_date" class="input" value="<?php echo $end_date; ?>" />
						<select name="end_h" >
							<?php foreach($h as $v): ?>
								<option value="<?php echo $v;?>" <?php if(isset($end_h) && $end_h==$v):?> selected="selected"<?php endif; ?>><?php echo $v;?></option>
							<?php endforeach; ?>
						</select>:
						<select name="end_i" >
							<?php foreach($i as $v): ?>
								<option value="<?php echo $v;?>" <?php if(isset($end_i) && $end_i==$v):?> selected="selected"<?php endif; ?>><?php echo $v;?></option>
							<?php endforeach; ?>
						</select>:
						<select name="end_s" >
							<?php foreach($s as $v): ?>
								<option value="<?php echo $v;?>" <?php if(isset($end_s) && $end_s==$v):?> selected="selected"<?php endif; ?>><?php echo $v;?></option>
							<?php endforeach; ?>
						</select>:
					</td>
				</tr>
				<tr>
					<td>Status</td>
					<td>
						<input type="radio" name="status" value="1" <?php if(isset($ads_assign['status']) && $ads_assign['status']==1): ?> checked="checked" <?php endif; ?> />Active
						<input type="radio" name="status" value="0" <?php if(isset($ads_assign['status']) && $ads_assign['status']==0): ?> checked="checked" <?php endif; ?> />UnActive
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" value="Save" >
						<input type="button" value="Cancel" class="btcancel" /></td>
				<tr>
			</table>
		</div>
	</div>
</div>